/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package application;

import java.io.File;
import javax.swing.filechooser.FileFilter;


/**
 *
 * @author Hui
 */
public class jpgFileFilter extends FileFilter {

        public boolean accept(File f) {
            String tmp = f.getName().toLowerCase();

            if (f.isDirectory()) {
                return true;
            }

            if (tmp.endsWith(".jpg")) {
                return true;
            }
            return false;
        }

        public String getDescription() {
            return "images(*.jpg)";
        }
    }
